package demo;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DemoTime {
    public static void main(String[] args) throws Exception {
        String t1 = "2013-05-30 7:49";
        String t2 = "2013-05-30 19:46";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd h:mm");
        Date t1Time = sdf.parse(t1);
        Date t2Time = sdf.parse(t2);

        System.out.println(t1Time.toLocaleString());
        System.out.println(t2Time.toLocaleString());
        System.out.println(t1Time.getTime() < t2Time.getTime());
    }
}
